

package com.cmcc.pcap.packet.sctp.nas.impl.ies;


import com.cmcc.pcap.packet.sctp.nas.core.ies.InformationElement6;
import com.cmcc.pcap.packet.sctp.nas.utils.OctetInputStream;
import com.cmcc.pcap.packet.sctp.nas.utils.OctetOutputStream;
import com.cmcc.pcap.packet.sctp.nas.utils.octets.OctetString;

public class IENasMessageContainer extends InformationElement6 {
    public OctetString value;

    public IENasMessageContainer() {
    }

    public IENasMessageContainer(OctetString value) {
        this.value = value;
    }

    public IENasMessageContainer(byte[] value) {
        this(new OctetString(value));
    }

    @Override
    protected IENasMessageContainer decodeIE6(OctetInputStream stream, int length) {
        IENasMessageContainer res = new IENasMessageContainer();
        res.value = stream.readOctetString(length);
        return res;
    }

    @Override
    public void encodeIE6(OctetOutputStream stream) {
        stream.writeOctetString(value);
    }
}
